package com.ytjj.qmyx.mall.enums;

import lombok.Getter;

@Getter
public enum MinAndMEnums {
    _1(0, "", ""),
    _2(1,"0","1000"),
    _3(2,"1000","1500"),
    _4(3,"1500",""),
    ;

    Integer key;

    String min;

    String max;

    MinAndMEnums(Integer key ,String min,String max){
        this.key = key;
        this.min = min;
        this.max = max;
    }

    public static MinAndMEnums getMinAndMax(Integer key){
        MinAndMEnums[] minAndMEnums = MinAndMEnums.values();
        for(int i = 0;i<minAndMEnums.length;i++){
            if(minAndMEnums[i].key == key){
                return minAndMEnums[i];
            }

        }
        return null;
    }
}
